<?php
/**
 * Created by PhpStorm.
 * User: sunzexin
 * Date: 2018/1/5
 * Time: 19:32
 */

namespace App\Http\Logics\MiniProgramAdmin;


use App\PartySignUp;
use App\Http\Logics\BaseLogic;
class PartySignUpLogic extends BaseLogic
{
    /**
     * 创建报名信息
     * @param $data 报名信息
     * @return mixed 返回结果
     */
    public static function createPartySignUp($data)
    {
        try {
            $party_sign_up = new PartySignUp();
            $party_sign_up->party_id = $data['party_id'];
            $party_sign_up->user_id = $data['user_id'];
            if (!$party_sign_up->save()) {
                return self::response(self::OBJECT_SAVE_FAIL);
            }
            return self::response(self::SUCCESS);
        }catch (\Exception $e){
            return self::response(self::SYSTEM_ERROR);
        }
    }
}